/*
 *  Copyright 2004 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.service.core;

import com.blandware.atleap.model.core.Localizable;
import com.blandware.atleap.persistence.core.LookupDAO;
import com.blandware.atleap.persistence.core.LocalizableDAO;

import java.util.List;


/**
 * <p>Business Delegate (Proxy) Interface to talk to persistence layer and
 * retrieve values for drop-down choice lists.
 * </p>
 * <p><a href="LookupManager.java.html"><i>View Source</i></a>
 * </p>
 *
 * @author Sergey Zubtsovskiy <a href="mailto:sergey.zubtsovskiy@blandware.com">&lt;sergey.zubtsovskiy@blandware.com&gt;</a>
 * @author Roman Puchkovskiy <a href="mailto:roman.puchkovskiy@blandware.com">
 *         &lt;roman.puchkovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.22 $ $Date: 2006/08/03 10:07:41 $
 */
public interface LookupManager extends BaseManager {
	//~ Methods ================================================================

	/**
	 * Sets DAO for performing lookup operations
	 *
	 * @param dao the DAO to set
	 */
	public void setLookupDAO(LookupDAO dao);

	/**
	 * Sets DAO for operating with localizables
	 *
	 * @param localizableDAO the DAO to set
	 */
	public void setLocalizableDAO(LocalizableDAO localizableDAO);	

	/**
	 * Retrieves all role names from persistence layer
	 *
	 * @return List of role names
	 */
	public List listRoleTitles();

	/**
	 * Retrieves all roles from persistence layer
	 *
	 * @return List of roles
	 */
	public List listRoles();

	/**
	 * Retrieves roles that are assigned to linkable items
	 *
	 * @return List of roles
	 */
	public List listRolesAssignedToLinkableItems();

	/**
	 * Retrieves roles that are assigned to some content pages
	 *
	 * @return List of roles
	 */
	public List listRolesAssignedToContentPages();

    /**
     * Retrieves roles that are assigned to some content resources
     *
     * @return List of roles
     */
    public List listRolesAssignedToContentResources();

	/**
	 * Retrieves roles that are assigned to some documents
	 *
	 * @return List of roles
	 */
	public List listRolesAssignedToDocuments();

	/**
	 * Retrieves roles that are assigned to some files
	 *
	 * @return List of roles
	 */
	public List listRolesAssignedToFiles();

	/**
	 * Retrieves roles that are assigned to some images
	 *
	 * @return List of roles
	 */
	public List listRolesAssignedToImages();

	/**
	 * Retrieves roles that are assigned to some users as free roles
	 *
	 * @return List of roles
	 */
	public List listFreeRolesAssignedToUsers();

	/**
	 * Retrieves roles that are assigned to some news items
	 *
	 * @return List of roles
	 */
	public List listRolesAssignedToNewsItems();

	/**
	 * Retrieves roles that are assigned to some forums
	 *
	 * @return List of roles
	 */
	public List listRolesAssignedToForums();

	/**
	 * Retrieves all groups from persistence layer
	 *
	 * @return List of groups
	 */
	public List listGroups();

	/**
	 * Retrieves all layout names from persistence layer
	 *
	 * @return List of layout names
	 */
	public List listLayoutNames();

	/**
	 * Retrieves all layouts from persistence layer
	 *
	 * @return List of layouts
	 */
	public List listLayouts();    

	/**
	 * Retrieves all types of content resources that are currently stored in
     * persistence layer
	 *
	 * @return List of content resource types
	 */
	public List listContentResourceTypes();

	/**
	 * Retrieves all mime-types of content resources that are currently stored
     * in persistence layer.
	 *
	 * @return List of content resource mime-types
	 */
    public List listContentResourceMimeTypes();

	/**
	 * Retrieves localizable with specified ID
	 *
	 * @param localizableId ID of localizable to retrieve
	 * @return Localizable
	 */
	public Localizable retrieveLocalizable(Long localizableId);

    /**
     * Returns list of ClassNameHolder instances for each class name among
     * pages (except ActionPages and ContentPages).
     *
     * @return list of ClassNameHolder instances
     */
    public List listLinkableItemsClassNames();
}
